package com.heima.controller;

import com.heima.domain.vo.TaskVo;
import com.heima.service.TaskService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/api/task-service/task")
@Api(tags = "工单管理")
public class TaskController {

    @Autowired
    private TaskService taskService;

    @GetMapping("/taskReportInfo/{start}/{end}")
    @ApiOperation("工单统计")
    public List<TaskVo> getTaskReport(@PathVariable String start,
                                      @PathVariable String end){
        List<TaskVo> list = taskService.getTaskReport(start,end);
        return list;
    }


}
